package cn.fch.gotrip.dao;

import cn.fch.gotrip.entity.TravelOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @program: gotrip
 * @description:
 * @CreatedBy: fch
 * @create: 2023-01-23 16:14
 **/
@Repository
public interface TravelOrderDao {
    int createTravelOrder(TravelOrder travelOrder);

    int deleteTravelOrder(@Param("id") String id);

    List<TravelOrder> queryAllTravelOrdersByType(@Param("type") Integer type);

    List<TravelOrder> queryByCreatAndType(@Param("type")Integer type,
                                          @Param("startTime")Date startTime,
                                          @Param("endTime")Date endTime);

    List<TravelOrder> searchOrderById(@Param("id") String id);

    TravelOrder queryOrderById(@Param("id")String id);
}
